package homework;
import java.util.Scanner;
public class test3 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.print("请输入顾客的类别（0表示普通顾客，1表示会员）：");
        int customerType = scan.nextInt();
        System.out.print("请输入购物的折前金额(整数即可)：");
        int originalPrice = scan.nextInt();
        double payableAmount = 0;
        if (customerType == 0 ) {
                if(originalPrice>0 && originalPrice < 100){
                    payableAmount = originalPrice;
                } else if (originalPrice >= 100) {
                    payableAmount = originalPrice * 0.9;
                } else {
                    System.out.println("输入的金额有误！");
                }
        } else if (customerType == 1) {
            if (originalPrice>0 && originalPrice < 200) {
                payableAmount = originalPrice * 0.8;
            } else if (originalPrice >= 20) {
                payableAmount = originalPrice * 0.75;
            }else{
                System.out.println("输入的金额有误！");
            }

        }else{
            System.out.println("输入的顾客类型有误！");
        }
        System.out.println("您的应付金额："+ payableAmount);

    }
}
